using AutoMapper;
using Enterprise.Entities.Dtos;
using HCD.Entities;
using HCD.Entities.Dtos;

// ReSharper disable once CheckNamespace
namespace HCD.Project.Dtos
{

    /// <summary>
    /// 配置ProjectPersonal的AutoMapper映射
    /// 前往 <see cref="EnterpriseApplicationModule"/>的AbpAutoMapper配置方法下添加以下代码段
    /// ProjectPersonalDtoAutoMapper.CreateMappings(configuration);
    /// </summary>
    public static class CustomProjectMapper
    {
        public static void CreateMappings(IMapperConfigurationExpression configuration)
        {
            configuration.CreateMap<ProjectPersonal, ProjectPersonalListDto>();

            configuration.CreateMap<ProjectPersonalEditDto, ProjectPersonal>().ForMember(p=>p.TenantId,opt=>opt.UseDestinationValue());
            configuration.CreateMap<ProjectPersonal, ProjectPersonalEditDto>();

            //// custom codes
            configuration.CreateMap<ProjectPersonal, ProjectPoolListDto>();
            configuration.CreateMap<Requirement, RequirementPoolListDto>();
            //// custom codes end
        }
    }
}
